home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / frame_1 / PlaceObject2_31_229 / CLIPACTIONRECORD onClipEvent(load).as
Text File  |  2013-04-24  |  4KB  |  167 lines

  1. onClipEvent(load){
  2.    function getScores()
  3.    {
  4.       if(G_TestHighScore == true)
  5.       {
  6.       }
  7.       if(gProxyObj == undefined)
  8.       {
  9.          if(G_TestHighScore == true)
  10.          {
  11.          }
  12.          listScores();
  13.       }
  14.       else
  15.       {
  16.          if(G_TestHighScore == true)
  17.          {
  18.          }
  19.          gProxyObj.getScores(cbFunc2);
  20.       }
  21.    }
  22.    function submitScore(theScore)
  23.    {
  24.       if(G_TestHighScore == true)
  25.       {
  26.       }
  27.       gProxyObj.submitScore(theScore,cbFunc);
  28.    }
  29.    function initHiScores()
  30.    {
  31.       if(G_TestHighScore == true)
  32.       {
  33.       }
  34.       gProxyObj.setGame_Id("sb_squarepantis");
  35.    }
  36.    function getScoreString()
  37.    {
  38.       var _loc7_ = "Oops! The high scores list is not available right now!";
  39.       if(gProxyObj != undefined)
  40.       {
  41.          var _loc6_ = gProxyObj.getScoreCount();
  42.          if(_loc6_ > 0)
  43.          {
  44.             var _loc2_ = undefined;
  45.             var _loc3_ = undefined;
  46.             var _loc4_ = undefined;
  47.             var _loc5_ = undefined;
  48.             _loc7_ = "";
  49.             strNumber = "";
  50.             strName = "";
  51.             strScore = "";
  52.             _loc2_ = 0;
  53.             while(_loc2_ < _loc6_)
  54.             {
  55.                _loc3_ = gProxyObj.getScoreItem(_loc2_);
  56.                _loc4_ = _loc3_[0];
  57.                _loc5_ = fStyleNumber(_loc3_[1]);
  58.                strNumber += _loc2_ + 1 + "\n";
  59.                strName += _loc4_ + "\n";
  60.                strScore += _loc5_ + " pts" + "\n";
  61.                _loc2_ = _loc2_ + 1;
  62.             }
  63.             _parent.mcState.mcState.mcState.mcPanel.txt_highScoreNumber.text = strNumber;
  64.             _parent.mcState.mcState.mcState.mcPanel.txt_highScoreName.text = strName;
  65.             _parent.mcState.mcState.mcState.mcPanel.txt_highScoreScore.text = strScore;
  66.          }
  67.          else
  68.          {
  69.             _parent.mcState.mcState.mcState.mcPanel.txt_highScoreName.text = "Whoops, the high scores seem to have escaped!";
  70.          }
  71.       }
  72.       else
  73.       {
  74.          _parent.mcState.mcState.mcState.mcPanel.txt_highScoreName.text = "Oops! The high scores list is not available right now!";
  75.       }
  76.       if(G_TestHighScore == true)
  77.       {
  78.       }
  79.       return _loc7_;
  80.    }
  81.    function listScores()
  82.    {
  83.       if(G_TestHighScore == true)
  84.       {
  85.       }
  86.       getScoreString();
  87.    }
  88.    function setText()
  89.    {
  90.       if(G_TestHighScore == true)
  91.       {
  92.       }
  93.    }
  94.    function cbFunc(thisBool)
  95.    {
  96.       if(thisBool)
  97.       {
  98.          if(G_TestHighScore == true)
  99.          {
  100.          }
  101.          listScores();
  102.       }
  103.       else
  104.       {
  105.          if(G_TestHighScore == true)
  106.          {
  107.          }
  108.          _parent.mcMain.txt_highScoreName.text = "Oops! The high scores list is not available right now!";
  109.       }
  110.    }
  111.    function cbFunc2(thisBool)
  112.    {
  113.       if(thisBool)
  114.       {
  115.          if(G_TestHighScore == true)
  116.          {
  117.          }
  118.          listScores();
  119.       }
  120.       else
  121.       {
  122.          if(G_TestHighScore == true)
  123.          {
  124.          }
  125.          _parent.mcMain.txt_highScoreName.text = "Oops! The high scores list is not available right now!";
  126.       }
  127.    }
  128.    function fStyleNumber(_nNumber, _nMinimumChar)
  129.    {
  130.       _sNumber = String(_nNumber);
  131.       _sNewString = "";
  132.       _nlength = _sNumber.length;
  133.       _nlength /= 3;
  134.       if(_nlength <= 1)
  135.       {
  136.          _sNewNumber = _sNumber;
  137.          if(_sNewNumber.length < _nMinimumChar)
  138.          {
  139.             _sNewNumber = "0" + _sNewNumber;
  140.          }
  141.          return _sNewNumber;
  142.       }
  143.       _nLoop = _nlength;
  144.       while(_nLoop > 1)
  145.       {
  146.          _sNewString = " " + _sNumber.substr(-3) + _sNewString;
  147.          _sNumber = _sNumber.substr(0,-3);
  148.          _nLoop--;
  149.       }
  150.       _sNewNumber = _sNumber + _sNewString;
  151.       if(_sNewNumber.length < _nMinimumChar)
  152.       {
  153.          _sNewNumber = "0" + _sNewNumber;
  154.       }
  155.       return _sNewNumber;
  156.    }
  157.    _global.HS = this;
  158.    var G_ShowHighScore = true;
  159.    var G_TestHighScore = false;
  160.    if(G_TestHighScore == true)
  161.    {
  162.       gProxyObj.setServer("www.nick.com");
  163.       gProxyObj.setScreenName("Simon");
  164.       gProxyObj.setIsLoggedIn(true);
  165.    }
  166. }
  167.